<style type="text/css">
	.header .links {
float:right;
margin-top:5px;
}
</style>

<div style="height:85px;border:0px solid #FFFFFF;position:relative;">
                       <div class="logo"></div>
                       <div class="MainNav">
                       	   
                       	   <?php
                       	   		//已经登陆
								if(Mage::getSingleton( 'customer/session' )->isLoggedIn()) {
							?>
                           <div class="LoginRegisterDIV">
                               <div class="LoginLink"><a href="<?php echo Mage::getUrl('customer/account/')?>"><img height="21" width="78" style=""  src="<?php echo $this->getSkinUrl('images/account-link.png')?>" alt=""></a></div>
                               <div class="LoginRegisterSplitLine"></div>
                               <div class="LoginLink"><a href="<?php echo Mage::getUrl('customer/account/logout/')?>"><img height="21" width="50" border="0" src="<?php echo $this->getSkinUrl('images/logout-link.png')?>" alt=""></a></div>
                               <div class="LoginRegisterSplitLine"></div>
                               <div class="RegisterLink"><a href="<?php echo Mage::getUrl('customer/checkout/cart/')?>"><img height="21" width="96" border="0" src="<?php echo $this->getSkinUrl('images/shoppingcart-link.png')?>" alt=""></a></div>
                           </div>
                           <?php 
								}
								else{
                           ?>
                           <div class="LoginRegisterDIV">
                               <div class="LoginLink"><a href="<?php echo Mage::getUrl('customer/account/login/')?>"><img height="21" width="48" style=""  src="<?php echo $this->getSkinUrl('images/login-link.png')?>" alt=""></a></div>
                               <div class="LoginRegisterSplitLine"></div>
                               <div class="LoginLink"><a href="<?php echo Mage::getUrl('customer/account/login/')?>"><img height="21" width="65" border="0" src="<?php echo $this->getSkinUrl('images/register-link.png')?>" alt=""></a></div>
                               <div class="LoginRegisterSplitLine"></div>
                               <div class="LoginLink"><a href="<?php echo Mage::getUrl('customer/checkout/cart/')?>"><img height="21" width="96" border="0" src="<?php echo $this->getSkinUrl('images/shoppingcart-link.png')?>" alt=""></a></div>
                           </div>
                           <?php 
								}
                           ?>
                           
                           <?php 
                            $style = 'style="width:90px"';
                           if ('index' == Mage::registry('current_url_key')){
                               $style = 'style="width:90px"';
                           }else if ('starttobug' == Mage::registry('current_url_key')){
                               $style = 'style="width:163px;margin-left:84px"';
                           }else if ('aboutus' == Mage::registry('current_url_key')){
                               $style = 'style="width:124px;margin-left:245px"';
                           }else if ('contactus' == Mage::registry('current_url_key')){
                               $style = 'style="width:144px;margin-left:366px"';
                           }
                           ?>
                            <div id="NavLineHome" <?php echo $style?>></div>
                           <div id="Nav">
                               <div id="NavHome">
                                   <a href="<?php echo Mage::getUrl('')?>">
                                       <img height="18" width="62" border="0" id="img_home" src="<?php if ('index' == Mage::registry('current_url_key')):?> <?php echo $this->getSkinUrl('images/navred_home.png')?>  <?php else :?> <?php echo $this->getSkinUrl('images/nav_home.png')?> <?php endif;?>" alt="">
                                   </a>
                               </div>
                               <div id="NavStartToBuy">
                                   <a href="<?php echo Mage::getUrl('home/index/starttobug')?>">
                                       <img height="18" width="148" border="0" id="img_starttobug" src="<?php if ('starttobug' == Mage::registry('current_url_key')):?> <?php echo $this->getSkinUrl('images/navred_starttobuy.png')?>  <?php else :?> <?php echo $this->getSkinUrl('images/nav_starttobuy.png')?> <?php endif;?>" alt="">
                                   </a>
                               </div>
                               <!--<div id="NavMenBlog"><a href="#"><img height="18" width="109" border="0" src="<?php echo $this->getSkinUrl('images/nav_menblog.png')?>" alt=""></a></div>-->
                               <div id="NavAboutUs">
                                   <a href="<?php echo Mage::getUrl('home/index/aboutus')?>">
                                       <img height="18" width="104" border="0" id="img_aboutus" src="<?php if ('aboutus' == Mage::registry('current_url_key')):?> <?php echo $this->getSkinUrl('images/navred_aboutus.png')?>  <?php else :?> <?php echo $this->getSkinUrl('images/nav_aboutus.png')?> <?php endif;?>" alt="">
                                   </a>
                               </div>
                               <div id="NavContactUs">
                                   <a href="<?php echo Mage::getUrl('home/index/contactus')?>">
                                       <img height="18" width="129" border="0" id="img_contactus" src="<?php if ('contactus' == Mage::registry('current_url_key')):?> <?php echo $this->getSkinUrl('images/navred_contactus.png')?>  <?php else :?> <?php echo $this->getSkinUrl('images/nav_contactus.png')?> <?php endif;?>" alt="">
                                   </a>
                               </div>
                          </div>
                        </div>
                        
</div>
<script language="javascript">
$('img_home').observe('mouseover', changeMouseOver); 
$('img_starttobug').observe('mouseover', changeMouseOver); 
$('img_aboutus').observe('mouseover', changeMouseOver); 
$('img_contactus').observe('mouseover', changeMouseOver); 

 function changeMouseOver(event) {
     var id = Event.element(event).id;
     
     if ('img_home' == id) {
         Event.element(event).src = '<?php echo $this->getSkinUrl('images/navred_home.png')?>';
     }
     else if('img_starttobug' == id) {
         Event.element(event).src = '<?php echo $this->getSkinUrl('images/navred_starttobuy.png')?>';
     }
     else if('img_aboutus' == id) {
         Event.element(event).src = '<?php echo $this->getSkinUrl('images/navred_aboutus.png')?>';
     }
     else if('img_contactus' == id) {
         Event.element(event).src = '<?php echo $this->getSkinUrl('images/navred_contactus.png')?>';
     }
 }
$('img_home').observe('mouseout', changeMouseOut); 
$('img_starttobug').observe('mouseout', changeMouseOut); 
$('img_aboutus').observe('mouseout', changeMouseOut); 
$('img_contactus').observe('mouseout', changeMouseOut); 
 function changeMouseOut(event) {
     var id = Event.element(event).id;
     if ('img_<?php echo Mage::registry('current_url_key')?>' == id){
          return;
     }
     if ('img_home' == id) {
         Event.element(event).src = '<?php echo $this->getSkinUrl('images/nav_home.png')?>';
     }
     else if('img_starttobug' == id) {
         Event.element(event).src = '<?php echo $this->getSkinUrl('images/nav_starttobuy.png')?>';
     }
     else if('img_aboutus' == id) {
         Event.element(event).src = '<?php echo $this->getSkinUrl('images/nav_aboutus.png')?>';
     }
     else if('img_contactus' == id) {
         Event.element(event).src = '<?php echo $this->getSkinUrl('images/nav_contactus.png')?>';
     }
 }
</script>